class User {
    static transients = ["confirmPassowrd"]
    String userName
    String firstName
    String lastName
    String password
    String confirmPassowrd
    Boolean active = false
    String email
    //String className
   
    Address address //one-to-one relation

    //File imgFile tak sie nie da


    static hasMany = [todos:Todo, categories: Categories]


    static constraints =
    {
        userName(blank:false, unique:true, minSize:5, maxSize:10)
        firstName(blank:false)
        lastName(blank:false)
        //address(nullable:false)
        email(blank:false, email:true)
        password(password:true)
        
    }

    String toString()
    {
        "${lastName} ${firstName}"
    }
}


